Fix: reserve dropdown popup scrollbar width to avoid suffix text crop…#253
Open
aniketsahu07 wants to merge 2 commits into
Open
Fix: reserve dropdown popup scrollbar width to avoid suffix text crop…#253aniketsahu07 wants to merge 2 commits into
aniketsahu07 wants to merge 2 commits into
Conversation
…ping on GTK/Linux
Comment on lines
+159
to
+164
| int scrollBarWidth = 0; | ||
| if (scrolledComposite.getVerticalBar() != null) { | ||
| scrollBarWidth = scrolledComposite.getVerticalBar().getSize().x; | ||
| } | ||
| // Reserve space for the vertical scrollbar to avoid cropping suffix text on GTK/Linux | ||
| contentSize.x += scrollBarWidth; |
Author
There was a problem hiding this comment.
Thanks — good catch. I removed the scrollbar-width reservation from the initial sizing in open() and now only reserve the scrollbar width inside constrainHeightIfNeeded() when the popup becomes scrollable. This avoids double-reserving the width and prevents the dropdown from becoming wider than necessary. PTAL.
…n constrained/scrollable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On some Linux (GTK) setups the dropdown popup's suffix text gets cropped when a vertical scrollbar appears. This change ensures the popup reserves the scrollbar width when sizing the content.
What I changed
In
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/swt/DropdownPopup.java:contentSize.xbefore setting the container size and min size.How to test
Notes
Closes #113